package cn.edu.fzu.homemaking.domain.enums;

/**
 * @author yifan
 * @date 2023/4/8
 */
public enum SysCompanyStatusEnum {
    NORMAL(0, "正常"),
    BAN(1, "禁用"),
    DELETE(-1, "删除");

    private final int    value;

    private final String desc;

    private SysCompanyStatusEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public int getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }


    public static SysCompanyStatusEnum parse(int value) {
        switch (value) {
            case 0:
                return NORMAL;
            case 1:
                return BAN;
            case 3:
                return DELETE;
            default:
                return null;
        }
    }
}
